
<!-- $Id: goods_trash.htm 14216 2008-03-10 02:27:21Z testyang $ -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ECSHOP 管理中心 - 商品回收站 </title>
<base href="__STATIC__/Admin/">
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />
<style>
  .panel-icloud .panel-right iframe {
    height: 300px;
    margin-top: 15px;
  }
  .panel-hint{
    top: 3%;
  }
</style>

</head>
<body>
<h1>
<span class="action-span"><a href="{:url('Admin/Goods/goods_list')}">商品列表</a></span>
<span class="action-span1"><a href="index.php?act=main">ECSHOP 管理中心</a> </span><span id="search_id" class="action-span1"> &nbsp;&nbsp;&nbsp;&nbsp; 商品回收站 </span>
<div style="clear:both"></div>
<!-- 商品搜索 -->

<div class="form-div">
  <form action="{:url('Admin/Goods/trash')}" method="get" name="searchForm">
    <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
        <!-- 关键字 -->
    关键字 <input type="text" name="keywords" size="15" />
    <input type="submit" value=" 搜索 " class="button" />
  </form>
</div>

<!-- 商品列表 -->
<div class="list-div" id="listDiv">
<table cellpadding="3" cellspacing="1">
  <tr>
    <th> <input type="checkbox" />
      <a href="javascript:;">编号</a><img src="images/sort_desc.gif"/></th>
    <th><a href="javascript:;">商品名称</a></th>
    <th><a href="javascript:;">货号</a></th>
    <th><a href="javascript:;">价格</a></th>
    <th><a href="javascript:;">库存</a></th>
    <th><a href="javascript:;">操作</a></th>
  </tr>
{foreach $data as $v}
  <tr>
    <td align="center"><input type="checkbox" name="checkboxes[]" value="" />{$v.goods_id}</td>
    <td align="center">{$v.goods_name}</td>
    <td align="center">{$v.goods_sn}</td>
    <td align="center">{$v.goods_price}</td>
    <td align="center">{$v.goods_number}</td>
    <td align="center"><a href="javascript:;" class="hy" id="{$v.goods_id}">还原</a> | <a href="javascript:;" class="sc" id="{$v.goods_id}">删除</a></td>
  </tr>
{/foreach}
</table>
</div>
<div>{$data->render()}</div>

<div id="footer">
共执行 11 个查询，用时 0.067383 秒，Gzip 已禁用，内存占用 1.660 MB<br />
版权所有 &copy; 2005-2018 上海商派软件有限公司，并保留所有权利。</div>
<!-- 新订单提示信息 -->

</body>
<script src="jquery.js"></script>
<script>
      $(".hy").on('click',function(){
          var id = $(this).attr('id');
          // alert(id)
          $.ajax({
              url:"{:url('Admin/Goods/goods_restore')}",
              type:'get',
              data:{id:id},
              dataType:'json',
              success:function(e){
                    if(e.code == 1){
                        alert(e.msg);
                        history.go(0)
                    }else{
                        alert(e.msg);
                        history.go(0)
                    }
              }
          });
      });

      $(".sc").on('click',function(){
          var id = $(this).attr('id');
          $.ajax({
              url:"{:url('Admin/Goods/goods_del')}",
              type:'get',
              data:{id:id},
              dataType:'json',
              success:function(e){
                    if(e.code == 1){
                        alert(e.msg);
                        history.go(0)
                    }else{
                        alert(e.msg);
                        history.go(0)
                    }
              }
          });
      });
</script>
</html>